package gefmvc;

import java.util.List;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.FreeformLayer;
import org.eclipse.draw2d.FreeformLayout;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.MarginBorder;
import org.eclipse.draw2d.XYLayout;
import org.eclipse.gef.editparts.AbstractGraphicalEditPart;

public class TopEditPart extends AbstractGraphicalEditPart {
	protected IFigure createFigure() {

		Figure f = new FreeformLayer();
		f.setLayoutManager(new FreeformLayout());
		XYLayout contentsLayout = new XYLayout();
		f.setBorder(new MarginBorder(1));
		f.setLayoutManager(contentsLayout);
		f.setOpaque(true);
		return f;
	}

	protected void createEditPolicies() {

	}

	protected List<NodeModel> getModelChildren() {
		List<NodeModel> children = ((Model) getModel()).getNodes();
		return children;
	}
}